

<?

$now = time();

$human = unix_to_human($now);

//echo $unix = human_to_unix($human);





//if(!isset($datoarray))
//{
		$datoarray = array(
			'aar' => (int)substr($human,0,4),
			'maaned' => (int)substr($human,5,2),
			'dag' => (int)substr($human,8,2),
			'time' => NULL,
			'minut' => NULL
		);
//}


//print_r($datoarray);


?>
<select style="width:50px" id="dag" class="dag" name="<? echo $dag;?>">
<?php 
	$available = 31;
    for($i = 1; $i <= $available; $i++) {
        
        ?><option value="<? echo $i; ?>" <? if($datoarray['dag'] == $i){ echo "selected='selected'"; } ?> ><? echo $i; ?></option>"<?
    }
?>
</select>


			<select style="width:90px" id="maaned" class="maaned" name="<? echo $maaned;?>">
				<option value="1" <? if($datoarray['maaned'] == 1){ echo "selected='selected'"; } ?>>januar</option>
				<option value="2" <? if($datoarray['maaned'] == 2){ echo "selected='selected'"; } ?>>februar</option>
				<option value="3" <? if($datoarray['maaned'] == 3){ echo "selected='selected'"; } ?>>marts</option>
				<option value="4" <? if($datoarray['maaned'] == 4){ echo "selected='selected'"; } ?>>april</option>
				<option value="5" <? if($datoarray['maaned'] == 5){ echo "selected='selected'"; } ?>>maj</option>
				<option value="6" <? if($datoarray['maaned'] == 6){ echo "selected='selected'"; } ?>>juni</option>
				<option value="7" <? if($datoarray['maaned'] == 7){ echo "selected='selected'"; } ?>>juli</option>
				<option value="8" <? if($datoarray['maaned'] == 8){ echo "selected='selected'"; } ?>>august</option>
				<option value="9" <? if($datoarray['maaned'] == 9){ echo "selected='selected'"; } ?>>september</option>
				<option value="10" <? if($datoarray['maaned'] == 10){ echo "selected='selected'"; } ?>>oktober</option>
				<option value="11" <? if($datoarray['maaned'] == 11){ echo "selected='selected'"; } ?>>november</option>
				<option value="12" <? if($datoarray['maaned'] == 12){ echo "selected='selected'"; } ?>>december</option>
			</select>



			<select style="width:60px" id="aar" name="<? echo $aar;?>">
				<?

				//echo $datoarray['aar'];
				
				$available = 2020;
				for($i = 1; $i <= $available; $i++) {
						?><option value="<? echo $i; ?>" <? if($i == $datoarray['aar']){ echo "selected='selected'"; } ?> > <? echo $i; ?> </option><?

		
	
				}
				//skriv_aar(1, $datoarray['aar']);
			?>
			</select>





            <!--select style="width:150px" id="alder" name="<? echo $alder;?>">
                    <option value="50">Efter Culost' Fald (ECF)</option>
                    <option value="49">Den Gyldenrøde Tidsalder (DGT)</option>

            </select-->
            <br/>
		<div class="klokken_holder">
			<a href="#" class="klokken_link" id="klokken_link" > </a>
			<p class="klokken" style="float:right;display:none;">klokken:
				<input type="text" id="time" name="<? echo $time;?>" style="width:20px;" >:
				<input type="text" id="minut" name="<? echo $minut;?>" style="width:20px;" value="00">
			</p>
		</div>

         





<? /*
$nu_offgame = time();

$dag = date('d',$nu_offgame);

$maaned = date('m',$nu_offgame);

$aar = date('Y',$nu_offgame);

//$datoarrayet kan bruges, hvis der er en særlig dato man gerne vil have vist i tidsformen, når den hentes ind. Hvis den ikke er sat, bliver den defineret herunder:
//if(!isset($datoarray))
//{
		$datoarray = array(
		'aar' => $aar,
		'maaned' => $maaned,
		'dag' => $dag
		);
//}
$valgt = 1;

?>
						
			<select name="dag_offgame">
			<? 
			
			function skriv_dag_3($i, $valgt)
			{
				if($i<32)
				{
					?><option value="<? echo $i; ?>" <? if($i == $valgt){ echo "selected='selected'"; } ?> ><? echo $i; ?></option><?
					
					
					skriv_dag($i+1, $valgt);
				}	
			}
			
			skriv_dag_3(1, $datoarray['dag']);
			
			?>
			</select>

			<select name="maaned_offgame">
				<option value="1" <? if($datoarray['maaned'] == 1){ echo "selected='selected'"; } ?>>januar</option>
				<option value="2" <? if($datoarray['maaned'] == 2){ echo "selected='selected'"; } ?>>februar</option>
				<option value="3" <? if($datoarray['maaned'] == 3){ echo "selected='selected'"; } ?>>marts</option>
				<option value="4" <? if($datoarray['maaned'] == 4){ echo "selected='selected'"; } ?>>april</option>
				<option value="5" <? if($datoarray['maaned'] == 5){ echo "selected='selected'"; } ?>>maj</option>
				<option value="6" <? if($datoarray['maaned'] == 6){ echo "selected='selected'"; } ?>>juni</option>
				<option value="7" <? if($datoarray['maaned'] == 7){ echo "selected='selected'"; } ?>>juli</option>
				<option value="8" <? if($datoarray['maaned'] == 8){ echo "selected='selected'"; } ?>>august</option>
				<option value="9" <? if($datoarray['maaned'] == 9){ echo "selected='selected'"; } ?>>september</option>
				<option value="10" <? if($datoarray['maaned'] == 10){ echo "selected='selected'"; } ?>>oktober</option>
				<option value="11" <? if($datoarray['maaned'] == 11){ echo "selected='selected'"; } ?>>november</option>
				<option value="12" <? if($datoarray['maaned'] == 12){ echo "selected='selected'"; } ?>>december</option>
			</select>
			
			<select name="aar_offgame">
				<?

				//echo $datoarray['aar'];
				
			function skriv_aar_3($k, $valgt)
			{
				if($k<2020)
				{
					?><option value="<? echo $k; ?>" <? if($k == $valgt){ echo "selected='selected'"; } ?> ><? echo $k; ?></option><?
					
					
					skriv_aar($k+1, $valgt);
				}	
			}
			
			skriv_aar_3($datoarray['aar'],$valgt);
			?>

			</select> <br><span class="ink">efter Kristi fødsel</span>

<? */ ?>
